package usi.ch.onto.lucene.scoring;

public class IndexTermItem {
	public String term;
	//public String docName; 
	public String field; 
	public int doc;
	public int freq;// term frequency with this document
	public float idf;// idf of term for this
										// document
	public float tf;
	public float tfidf;	
	
	public double df;
	
	
	static final String SEPARATOR = ";";
	public static String getHeader(){
		return "term;doc;freq;tf;df;idf;tfidf;field";
	}
	
	
	public String toString(){
		StringBuilder sb = new StringBuilder();
		
		sb.append(term);sb.append(SEPARATOR);
		sb.append(doc);sb.append(SEPARATOR);
		sb.append(freq);sb.append(SEPARATOR);
		sb.append(tf);sb.append(SEPARATOR);
		sb.append(df);sb.append(SEPARATOR);
		sb.append(idf);sb.append(SEPARATOR);
		sb.append(tfidf);sb.append(SEPARATOR);
		sb.append(field);sb.append(SEPARATOR);
		
		
		return sb.toString();
	}
}
